import 'package:dio/dio.dart';
import 'package:sainbainu/common/http/http.dart';

class CommentApi {
  /// 评论列表
  Future<Map<String, dynamic>> commentList(
    Map<String, dynamic> params,
  ) async {
    Response res = await Http.get(
      '/api/customer/comment/be_note_list',
      params: params,
    );
    return res.data;
  }

  /// 回复列表
  Future<Map<String, dynamic>> replyCommentList(
    Map<String, dynamic> params,
  ) async {
    Response res = await Http.get(
      '/api/customer/comment/be_comment_list',
      params: params,
    );
    return res.data;
  }

  /// 评论新增
  Future<Map<String, dynamic>> commentAdd(Map<String, dynamic> data) async {
    Response res = await Http.post(
      '/api/customer/comment/add',
      data: data,
    );
    return res.data;
  }

  /// 评论删除
  Future<Map<String, dynamic>> commentDel(Map<String, dynamic> data) async {
    Response res = await Http.post(
      '/api/customer/comment/del',
      data: data,
    );
    return res.data;
  }
}
